<form action="keyword.manage.php" id="form_del" name="form_del" method="post">
	<input type="hidden" name="action" value="finish_del" />
    <table width="680" class="from_table become">
		<tr>
			<tpl> section name=loop loop=$file_array </tpl>
				<td width="680" align="center">
					<a href="javascript:;" onclick="ajax_finish('<tpl> $file_array[loop] </tpl>');">
				  <tpl> $file_array[loop] </tpl></a>
		  </td>
				<tpl> if $smarty.section.loop.rownum%4 eq 0 </tpl>
	  </tr>
				<tr>
				<tpl> /if </tpl>
			<tpl> /section </tpl>
		</tr>
  </table>
</form>
<div id="question" style="display:none; cursor: default; padding:10px"> 
       </b> <br />
        <input type="button" id="yes" value="<tpl> $langKeywordAllSave </tpl>"  style=" border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
        <input type="button" id="no" value="<tpl> $langKeywordAllDel </tpl>"  style="border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
		<input type="button" id="re_set" value="<tpl> $langKeywordCancel </tpl>"  style="border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
</div> 
<script>
$(document).ready(function() {

	var options = {
		beforeSubmit:  function(){showLoading(showSaveText);},
		success:       function(msg){
							hideLoading();
							showMessage(msg.message,msg.type);
							if(msg.type == '1'){
								ST(0,0);
								ShowDiv	= 'result_content';
								getPageContent("keyword.manage.php?action=ajax_list");
							}
						},
		type:      'post',
		dataType:  'json'
	};
	$("#form_del").validate({
		errorClass: "wrong",
		rules: {
		},
		messages: {
		},
		submitHandler: function() {
			$('#form_del').ajaxSubmit(options);
		}
	});
	
	//批量整理
	var question = $('#question')[0];
	$("#batch").click(function(){
		$.blockUI(question, { width: '275px' });
	
	
	});
	
	$('#yes').click(function() {/* 保存 */$.unblockUI();
			ajax_batch_finish('save');
			return false;
		});
	$('#no').click(function() {/* 删除 */$.unblockUI();
			ajax_batch_finish('del');
			return false;
		});
	$('#re_set').click($.unblockUI);	
});

function ajax_finish(str){
	ShowDiv	= 'result_content';
	getPageContent("keyword.manage.php?action=finish_info&url="+str);
}

function ajax_batch_finish(type){
	$.ajax({
			url: "keyword.manage.php",
			data: 'action=finish_batch&type='+type,
			type:'post',
			dataType:"json",
			beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
			success: function(msg){
				hideLoading();
				showMessage(msg.message,msg.type);
				if(msg.type == 1){
					ShowDiv='mainshow';
					getPageContent('keyword.manage.php?action=finish');
				}
				$.unblockUI(); 
			}
		});
	return false; 
}
</script>